<template>
  <el-scrollbar height="100vh">
    <router-view/>
  </el-scrollbar>
</template>

<script setup lang="ts">

import {onMounted} from "vue";
import {getLoginInfoRequest} from "./api/login.ts";
import {useRouter} from "vue-router";

const router = useRouter();

onMounted(async ()=>{
  const response = await getLoginInfoRequest();
  if (response.code===-1){
    await router.push("/login");
  }
});

</script>

<style scoped>

</style>
